package com.zzcoder.mall.data.dao.repository;

import com.zzcoder.mall.data.model.PmsCategory;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface PmsCategoryRepository extends BaseEntityRepository<PmsCategory> {
    List<PmsCategory> findAllByRootIdEquals(Long rootId);

    List<PmsCategory> findAllByRootIdIn(List<Long> rootIds);

    Page<PmsCategory> findAllByParentIdEquals(Long parentId, Pageable pageable);

    List<PmsCategory> findAllByParentIdEquals(Long parentId);
}
